<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../../vue.js"></script>
  <style>
    .red {
      color: red;
    }

    .box {
      background: #666;
      width: 200px;
      height: 200px;
    }

    .wrapper {
      width: 100px;
      height: 100px;
    }
  </style>
</head>

<body>
  <div id="app">

    <!-- 对象 -->
    <!-- <div :class="title">gp18-1</div> -->
    <!-- 数组 -->
    <!-- <div :class="[fontclass,boxclass]">gp18-2</div> -->


    <!-- <tap-position class="box"></tap-position> -->


    <!-- <div :style="{color:color,'font-size':fontSize}"> inline style </div> -->

    <div :style="[baseStyle,boxstyle]"> inline style </div>

  </div>

  <script>

    Vue.component('tap-position', {
      template: '<div class="wrapper">position  <div> </div> </div>'
    })


    var vm = new Vue({
      el: "#app",
      data: {
        color: 'red',
        fontSize: '30px',
        title: {
          red: true,
          box: false
        },
        fontclass: 'red',
        boxclass: 'box',
        baseStyle: {
          color: 'red',
          fontSize: '30px'
        },
        boxstyle: {
          width: '100px',
          height: '100px',
          'background': '#666'
        }
      }
    })
  </script>

</body>

</html>